package com.wing.warehouse.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.warehouse.model.entity.PalletBoxList;
import com.wing.warehouse.model.request.PalletBoxListForm;
import com.wing.warehouse.model.response.PalletBoxListVO;

import java.util.List;
import java.util.Map;

/**
 * 托盘料箱清单-Service
 *
 * @author
 */
public interface PalletBoxListService extends IService<PalletBoxList> {

    /**
     * 添加
     *
     * @param palletBoxListForm
     * @return
     */
    boolean add(PalletBoxListForm palletBoxListForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<PalletBoxListVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<PalletBoxListVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    PalletBoxListVO get4appById(Long id);

    /**
     * 得到条形码
     *
     * @param code 代码
     * @return {@link String}
     */
    String getBarCode(String code);

    PalletBoxListVO getPalletBox(String code,Long warehouseId);

    PalletBoxListVO getPalletBoxByLabelCode(String labelCode);

    List<PalletBoxListVO> getBoxByDeliveryDetailId(Long deliveryDetailId);
    /**
     * 查询入库计划产品的料箱以及料箱的条码
     * @param skuCode
     * @param warehouseId
     * @return
     */
    List<PalletBoxListVO> getPLanProductBoxByJobProductId(String skuCode, Long warehouseId);

    /**
     * 查询出库作业/产品的料箱数据和仓库库存
     * @param skuCode
     * @param warehouseId
     * @return
     */
    List<PalletBoxListVO> getOutWorkPalletBoxList(String skuCode, Long warehouseId);
}
